package handlers

import (
	"venus/servers/game/objects"
	"venus/service/sv_tcp/znet"
)

// GetPLayer 获取绑定玩家
func GetPLayer(request *znet.Request) (player *objects.Player, hasPlayer bool) {
	if request.Conn.BindObj == nil {
		return nil, false
	}
	return request.Conn.BindObj.(*objects.Player), true
}
